#ifndef EXTERNALCMDNOTIFICATOR_H
#define EXTERNALCMDNOTIFICATOR_H

#include <QObject>
#include <QProcess>
#include <QtPlugin>
#include "notification/notificator.h"

namespace Wishmaster
{
	class ExternalCmdNotificator : public QObject, public Notificator
	{
		Q_OBJECT
		Q_INTERFACES(Wishmaster::Notificator)
	public:
		ExternalCmdNotificator();
		virtual ~ExternalCmdNotificator();

		virtual bool notify(const Notification& notification);
		virtual QSharedPointer<QWidget> makeConfig();
		virtual bool updateConfig(const QSharedPointer<QWidget>& config);

	private:
		QProcess m_process;
		QString m_cmd;
	};

	class ExternalCmdNotificatorFactory : public QObject, public NotificatorFactory
	{
		Q_OBJECT
		Q_INTERFACES(Wishmaster::NotificatorFactory)

	public:
		virtual QString id();
		virtual QSharedPointer<Notificator> createNotificator();
	};
}

#endif // EXTERNALCMDNOTIFICATOR_H
